<p>
    <?= $this->App->buttonLink('+ Nova Rezervacija', '/location_reservations/create') ?> |
    <?= $this->Html->link('Lokacije', '/locations') ?>
</p>

<?= $this->element('entity_table', array(
    'columns' => array(
        'Id'          => 'LocationReservation.id',
        'Period'      => array('LocationReservation.start', function($row){
            return date_local($row['LocationReservation']['start']) . " - " .
                   date_local($row['LocationReservation']['end']);
        }),
        'Lokacija'    => 'Location.name',
        'Klijent'     => 'Client.name'
    ),
    'columnWidth' => array(
        'Id'       => '1%',
        'Period'   => '15%',
        'Lokacija' => '20%'
    ),
    'links'    => array(
        'Period'   => array('/location_reservations/edit/%d', 'LocationReservation.id'),
        'Lokacija' => array('/locations/edit/%d', 'Location.id'),
        'Klijent'  => array('/clients/edit/%d', 'Client.id')
    ),
    'data'     => $reservations,
    'id'       => 'LocationReservation.id',
    'entity'   => 'location_reservations',
    'sort_by'  => $sort_by,
    'sort_dir' => $sort_dir,
    'actions'  => array(
        
    )
)) ?>